#============================================================================
#  Name:
#    DMSS6550.mak
#
#  Description:
#    Makefile to build the DMSS software for the SURF (Subscriber Unit
#    Reference Design) using the MSM6550 (ARM) ASIC.
#
# Copyright (c) 2004-2006 by QUALCOMM, Incorporated.  All Rights Reserved.
#============================================================================
#
#                        EDIT HISTORY FOR MODULE
#
# $Header: //depot/asic/qsc6055/branches/QSC6085_4.3P1/build/ms/dmss60x5.mak#8 $ $DateTime: 2009/05/04 01:44:53 $ $Author: sathatra $
#
# when       who     what, where, why
# -------    ---     --------------------------------------------------------
# 03/25/09   dk      Adding support for demand loading/progressive boot.
# 11/27/07   gdp     HDT Static Extension.
# 08/26/07   gdp     BREW DBGR.
# 08/15/07   gdp     More changes for JAUNS Support.
# 08/01/07   gdp     Changes for JAUNS Support.
# 06/15/07   gdp     Changes for WLAN Support.
# 05/21/07   gdp     Added QMDP Objects.
# 05/01/07   amw     Include files for NOR partition table.
# 01/15/07   fs      Added PARB
# 11/14/06   ven     Removed QTCAM
# 07/25/06   mpa     Added DATA_MAIN_MDM_OBJS
# 02/08/06   ljl     Added RVCT support
# 07/28/05   wd      L4 Merge
# 03/03/05   ap      Add VIDEOFMT.
# 02/25/05   jkl     Fixed VR featurization.
# 02/23/05   ap      Added QVP.
# 02/17/05   ap      Added PMAPP_OTG_OBJS
# 01/13/05   ap      Added profiling.
# 01/19/05   ts      Added support for non-secured NOR boot.
# 12/02/03   ap      Added PBM TASK support.
# 11/19/04   ap      Added support for MVS.
# 11/18/04   ap      Deleted spritegame.
# 11/08/04   jas     Split ext_misc.min from ext_oem.min
# 10/27/04   ap      Added support for QALBUM.
# 09/23/04   ap      Deleted BCMCS_OBJS, moved to lib.
# 09/22/04   ktr     Added Progressive Boot support.
# 09/18/04   jkl     Added TCXOMGR.
# 09/16/04   ap      Deleted XMLPARSE.
# 09/13/04   jkl     Added FOTAand Joystick.
# 09/07/04   drl     Added JPEG.
# 08/31/04   mvd     Replaced CAMIF with CAMSENSOR.
# 08/12/04   ap      Added DATA HDRBC OBJS.
# 08/09/04   jkl     Added NETDIAGNOSTICS_OBJS.
# 07/19/04   ny      Added qtv_dec.lib
# 06/18/04   ry      Added BTPF_OBJS.
# 06/03/04   jkl     Added build time.
# 05/28/04   jkl     Updated features.
# 05/10/04   AP      Initial release
#============================================================================

all : build_start dmss build_end

#-------------------------------------------------------------------------------
# Path to ARM 1.2 tools
#-------------------------------------------------------------------------------
ARMHOME := $(subst \,/,$(ARMHOME))


#-------------------------------------------------------------------------------
# Target configuration type
#-------------------------------------------------------------------------------
ifeq ($(USES_SURF),yes)
   TARGCONFIG = surf
else
   ifeq ($(USES_FFA),yes)
      TARGCONFIG = ffa
   else
      TARGCONFIG = none
   endif
endif

ifeq ($(USES_SIGN_AMSS),yes)
   SIGN_AMSS = true
endif

#-------------------------------------------------------------------------------
# Secondary Boot Loader Generation
#-------------------------------------------------------------------------------
ifeq ($(USES_GEN_QC_SBL),yes)
   SBL_TYPE  = qcsbl
else
   ifeq ($(USES_GEN_OEM_SBL),yes)
      SBL_TYPE = oemsbl
   endif
endif

#-------------------------------------------------------------------------------
# Boot security type
#-------------------------------------------------------------------------------
ifeq ($(USES_ROMBOOT),yes)
   SEC_MODE = rom
else
ifeq ($(USES_SECBOOT),yes)
   SEC_MODE = sec
else
   SEC_MODE = nonsec
endif
endif
export SEC_MODE
#-------------------------------------------------------------------------------
# Boot and component types
#-------------------------------------------------------------------------------
ifeq ($(USES_NAND_SDRAM),yes)
   FLASH_TYPE = nand
   BOOT_TYPE  = multiple
else
   ifeq ($(USES_NOR_PSRAM),yes)
      FLASH_TYPE = nor
      BOOT_TYPE  = single
   else
      FLASH_TYPE = shadow
      BOOT_TYPE  = single
   endif
endif

#-------------------------------------------------------------------------------
# Core includes
#-------------------------------------------------------------------------------
include boot_targets_cfgdata.min
include dmss_flags.min
include pboot.min
include incpaths.min
include dmss_$(ASIC)_flags.min
include armtools.min
-include amss_lint_flags.min
-include amss_rvct_flags.min
include boot_targets_version_$(SEC_MODE).min
include boot_targets_$(SEC_MODE).min
include boot_targets_param.min
include boot_targets_layout.min
export MIBIB
#-------------------------------------------------------------------------------
# Object includes
#-------------------------------------------------------------------------------
include dmss_objects.min

build_start:
	@$(BTIME) -start build_time.bt -b

build_end: dmss   # added dependency so timing for parallel builds is accurate
	@$(BTIME) -end build_time.bt -b


########## IAC OEM@BEGIN

IAC_OEM_OBJECTS = \
			$(IACPUB_OBJS) \
			$(SMSAPP_OBJS) \
			$(NOTEPAD_OBJS) \
			$(PEDIMETER_OBJS)	\
			$(TEMPLATE_OBJS) \
			$(CALCULATOR_OBJS) \
			$(USERPROFILES_OBJS) \
			$(UNITCONVERTER_OBJS) \
			$(CONTACTAPP_OBJS) \
			$(IMGAPP_OBJS) \
			$(IMGEXT_OBJS) \
			$(SETTINGAPP_OBJS) \
			$(CALENDARAPP_OBJS) \
			$(SCHEDULEAPP_OBJS) \
			$(DIALERAPP_OBJS) \
			$(RECENTCALLS_OBJS) \
			$(ALARMAPP_OBJS) \
			$(FMGRAPP_OBJS) \
			$(BREWAPP_OBJS) \
			$(STOPWATCH_OBJS) \
			$(WORLDCLOCK_OBJS) \
			$(AUDIOPLAYER_OBJS) \
			$(VIDEOPLAYER_OBJS) \
			$(IACINTERFACE_OBJS) \
			$(CAMERAPHOTOAPP_OBJS) \
                        $(OCRAPP_OBJS) \
			$(CAMERAVIDEOAPP_OBJS) \
			$(MMSAPP_OBJS) \
			$(WSP_OBJS) \
			$(VOICEMAIL_OBJS) \
			$(CATAPP_OBJS) \
			$(FMRADIOAPP_OBJS) \
			$(VOICERECORD_OBJS) \
			$(VIDEOPHONE_OBJS) \
			$(WEBMENU_OBJS) \
			$(WEBITEM_OBJS) \
			$(SURFING_OBJS) \
			$(CUSTOMERSERVICE_OBJS) \
			$(KJAVA_OBJS)	\
			$(AREAQUERY_OBJS) \
			$(DIAGAPP_OBJS) \
			$(ENGINEERMODEAPP_OBJS) \
			$(EMAILAPP_OBJS) \
			$(ACCESS_EMAIL_OBJS)  \
			$(EBOOK_OBJS) \
			$(DUMMY_OBJS) \
			$(TANK_OBJS) $(GAMEMANAGER_OBJS) $(PUKE_OBJS) $(PUSHBOX_OBJS) \
                        $(ENGBARAPP_OBJS) \
			$(PCLINK_OBJS) 

#Modify_B By langjianzhong for __BREW_SLV_SMS__ 2009-6-16 (Add SLV SMS to brew project)
ifeq ($(USES_DUAL_MODULE), yes)
IAC_OEM_OBJECTS += $(SLVSMSAPP_OBJS)
endif
#Modify_E

#Modify_B By qyl071317 for __BREW_SLV_STK__ 2009-09-23 (Add SLV STK to brew project)
ifeq ($(USES_DUAL_MODULE), yes)
IAC_OEM_OBJECTS += $(SLVSTK_OBJS)
endif
#Modify_E
ifeq ($(USES_MM_TOOLS), yes)
IAC_OEM_OBJECTS += $(TOOLBOX_OBJS)
endif

ifeq ($(USE_NATIVE_BUIW_WIDGETS),yes)
IAC_OEM_OBJECTS += $(BUIW_WIDGETS_OBJS) $(BUIW_FORMS_OBJS)
endif

ifeq ($(USE_CAMERA_INTERPOLATION), yes)
IAC_OEM_OBJECTS += $(INC_IMAGE_UTILS_OBJS)
endif
			
IAC_OEM_HTTP_OBJECTS = \
			$(IAC_HTTP_OBJS) \
			$(HTTP_INETLIB_OBJS) \
			$(HTTP_INETLIB_EXTLIB_OBJS) \
			$(HTTP_INETLIB_ZLIB_OBJS) \
			$(HTTP_INETLIB_INET_OBJS) \
			$(HTTP_INETLIB_UTIL_OBJS) \
			$(HTTP_TOOLKIT_OBJS) 
			
IAC_OEM_WBRS_OBJECTS = \
			$(WBRS_WCTRL_OBJS) \
			$(WBRS_SCRIPT_LIB_OBJS) \
			$(WBRS_SCRIPT_COMP_OBJS) \
			$(WBRS_PARSER_XHTML_OBJS) \
			$(WBRS_PARSER_CSS_OBJS) \
			$(WBRS_LAYOUT_OBJS) \
			$(WBRS_INET_OBJS) \
			$(WBRS_ROOT_OBJS) \
			$(WBRS_WTK_OBJS)
			

IAC_OEM_NF_OBJECTS = \
			$(NF_PEER_OBJS) \
			$(NF_WEBITEM_OBJS) \
			$(NF_APPS_OBJS) \
			$(NF_DNLD_OBJS) \
			$(NF_DRM_OBJS)
			
			
IAC_OEM_OBJECTS += $(IAC_OEM_HTTP_OBJECTS)			

ifeq ($(USE_ACCESSNF), yes)
	IAC_OEM_OBJECTS += $(IAC_OEM_NF_OBJECTS)			
else
	IAC_OEM_OBJECTS += $(IAC_OEM_WBRS_OBJECTS)			
endif

ifeq ($(USE_WIDGETS_DESKTOP), yes)
	IAC_OEM_OBJECTS += $(IAC_WIDGETS_OBJECTS) $(SKY_APPS_OBJS)			
endif

########## IAC OEM@END

#-------------------------------------------------------------------------------
# Object groups that are specific to this target
#-------------------------------------------------------------------------------
# INSERT OBJECTS MACROS HERE
# Build the full object list for this target
OBJECTS = \
                $(REX_OBJS) \
                $(ADC_OBJS)  \
                $(ADIE_OBJS) \
                $(ADSP_OBJS) \
                $(ANSIC_OBJS) \
                $(APPMGR_OBJS) \
                $(AUDFMT_OBJS) \
		$(AUDTP_OBJS) \
		$(AUDIOCAL_OBJS)\
                $(AVS_OBJS) \
                $(AUDIOSBC_OBJS) \
                $(BIO_OBJS) \
                $(BOOT_OBJS) \
                $(CHG_OBJS) \
		$(CGPS_EXT_OBJS) \
                $(CGPS_NV_OBJS) \
                $(CLK_OBJS) \
                $(CLKREGIM_OBJS) \
                $(CM_OBJS) \
                $(CMX_OBJS) \
                $(COREAPP_OBJS) \
                $(IAC_OEM_OBJECTS) \
                $(MODEM_DATA_1X_707_MAIN_OBJS)\
                $(MODEM_DATA_COMMON_1XATCOP_OBJS) \
                $(MODEM_DATA_COMMON_DSMGR_OBJS) \
                $(MODEM_DATA_COMMON_COMMONATCOP_OBJS) \
                $(MODEM_DATACOMMON_OBJS) \
                $(MODEM_DATA_1X_BCDB_OBJS)\
                $(MODEM_DATA_1X_707_MAIN_MDM_OBJS)\
                $(DATA_RLP_OBJS) \
                $(DATA_MIP_OBJS) \
                $(MODEM_DATA_1X_MIP_OBJS)\
                $(DATA_JCDMA_OBJS) \
                $(DCP_OBJS) \
                $(DH_OBJS) \
                $(DIAG_OBJS) \
                $(DLOAD_OBJS) \
                $(DMOV_OBJS) \
                $(DMOV_MSM_OBJS) \
                $(DRVLIB_OBJS)\
                $(DSM_OBJS) \
                $(FS_OBJS) \
                $(FTM_RF_OBJS) \
                $(GRAPH_OBJS) \
                $(HS_OBJS) \
                $(HS_SURF_OBJS) \
                $(HW_OBJS) \
                $(I2C_OBJS) \
                $(RDA_OBJS)  \
                $(KPD_OBJS) \
                $(MDSP_OBJS) \
                $(MDSPSVC_OBJS) \
                $(MMOC_OBJS) \
                $(MUX_OBJS) \
                $(MVS_OBJS) \
                $(NVIM_OBJS) \
                $(PARB_OBJS) \
                $(PMAPP_GEN_OBJS) \
                $(PMAPP_OTG_OBJS) \
                $(PNG_OBJS) \
                $(Q3D_DRV_OBJS) \
                $(QARE_OBJS) \
                $(QDSP_OBJS) \
                $(QDSPUTIL_OBJS) \
                $(RF_MM_API_OBJS) \
                $(RF_OBJS) \
                $(RTE_OBJS) \
                $(SADC_OBJS) \
                $(SBI_OBJS) \
                $(TRM_OBJS) \
                $(SD_OBJS) \
                $(SDAC_OBJS) \
                $(SEC_OBJS) \
                $(SIO_OBJS) \
                $(UART_OBJS)  \
                $(RDEVMAP_OBJS) \
                $(SLEEP_OBJS) \
                $(SLEEPCTL_OBJS) \
                $(SRCH_OBJS) \
		$(SRCH4_OBJS) \
                $(1X_DRIVER_OBJS) \
                $(SAMPLE_SERVER_OBJS) \
                $(STM_OBJS) \
                $(TASK_OBJS) \
                $(TCXOMGR_OBJS) \
                $(THERM_OBJS) \
                $(TIME_OBJS) \
                $(TLMM_OBJS) \
                $(TMC_OBJS) \
                $(TOKENBUCKET_OBJS) \
                $(TRAMP_OBJS) \
                $(TS_CAMIF_DRV_OBJS) \
                $(USB_OBJS) \
                $(USB_CARKIT_OBJS) \
                $(UTILS_OBJS) \
                $(VBATT_OBJS) \
                $(VS_OBJS) \
                $(WMS_OBJS) \
                $(XMLLIB_OBJS) \
                $(EFUSE_OBJS) \
                $(MSM_SUPPORT_OBJS) \
                $(HIT_OBJS) \
                $(PCA_OBJS) \
                $(TP_OBJS) \
                $(FMRADIO_OBJS)  \
		  $(MALLOC_MGR_OBJS) \
		  $(3D_OBJS) \
		  $(IRSENSOR_OBJS) 		  

ifeq ($(USES_SC16IS750), yes)
OBJECTS += $(EXT_SERIAL_OBJS)
endif

OBJECTS2 = \
                $(AUXSETTINGS_OBJS) \
                $(CAMERACOMMONINTERFACE_OBJS) \
                $(CAMERACONTROL_OBJS) \
                $(CAMERAPARMS_OBJS) \
                $(CAMERARAW_OBJS) \
                $(CAMERASERVICES_OBJS) \
                $(CAMERA_DIAG_OBJS) \
                $(CAMERA_ADSP_OBJS) \
                $(CAMERA_VFE_OBJS) \
                $(CAMERA_FLASH_OBJS) \
                $(VIDEO_RESOURCES_OBJS) \
                $(CAMERA_HJR_OBJS) \
                $(CAMERA_YCBCRDOWNSIZER_OBJS)\
                $(CAMERA_LPM_OBJS)\
                $(CAMERA_3A_AEC_OBJS) \
                $(CAMERA_3A_AWB_OBJS) \
                $(CAMERA_3A_AF_OBJS) \
                $(CAMERA_3A_COMMON_OBJS) \
                $(CAMERA_CAMERADRIVETASK_OBJS) \
                $(CAMERA_QMOBICAT_OBJS) \
                $(CAMERA_MOBICAT_OBJS) \
                $(CAMSENSORCOMMON_OBJS) \
                $(CAMSENSOR_VB6800_STM3M2VC_OBJS) \
                $(CAMSENSOR_VB6801_STM3M2VC_OBJS) \
                $(CAMSENSOR_MT9D011_MU2M0VC_OBJS) \
                $(CAMSENSOR_MT9D011_MU2M0_OBJS) \
                $(CAMSENSOR_MT9D111_MU2M0_OBJS) \
                $(CAMSENSOR_IU011F_SN2M0PZ_OBJS) \
                $(CAMSENSOR_IU018F_SN3M0PZ_OBJS) \
                $(CAMSENSOR_MT9T012_MU3M0PZ_OBJS) \
                $(CAMSENSOR_MT9T013_MU3M0_OBJS) \
                $(CAMSENSOR_MT9P012_MU5M0_OBJS) \
                $(CAMSENSOR_MT9D112_MU2M0YU_OBJS) \
                $(CAMSENSOR_MT9M112_MU1M3YU_OBJS) \
                $(CAMSENSOR_MT9V111_MUVGAYU_OBJS) \
                $(CAMSENSOR_NI_GPIO_OBJS) \
                $(EXT_QAUDIOFX_OBJS) \
                $(QCAMCOMMON_OBJS) \
                $(QCAMERA_OBJS) \
                $(QALBUM_OBJS) \
                $(IPL_COLORCONVERSION_OBJS) \
                $(IPL_COMPOSE_OBJS) \
                $(IPL_HJR_OBJS) \
                $(IPL_REDEYE_OBJS) \
                $(IPL_SPECIALEFFECTS_OBJS) \
                $(IPL_STITCH_OBJS) \
                $(IPL_TRANSFORMATION_OBJS) \
                $(IPL_UTILITY_OBJS) \
                $(AUDFMT_CMX_OBJS) \
                $(DATASTATSAPP_OBJS)\
                $(DISP_OBJS) \
                $(FLDDBG_OBJS) \
                $(EXIF_OBJS) \
                $(JPEGADSPDRIVER_OBJS) \
                $(JPEGDECODER_OBJS) \
                $(JPEGENCODER_OBJS) \
                $(JPEGMALLOC_OBJS) \
                $(GPSAPP_OBJS) \
                $(ICARD_OBJS) \
                $(ICARDSESSION_OBJS) \
                $(ICAT_OBJS) \
                $(ISTK_OBJS) \
                $(DCTSTK_OBJS) \
                $(LCD_SURF_OBJS) \
                $(MDP_OBJS)\
                $(QMDP_OBJS) \
                $(MEDIAPLAYER_OBJS) \
                $(NETSETTINGS_OBJS) \
                $(SHOW3D_OBJS) \
                $(SVCPRG_OBJS) \
                $(WMSAPP_OBJS) \
                $(OEM_OBJS) \
                $(STATIC_EXT_OBJS)\
                $(OEM_NONPK_OBJS) \
                $(OEM_ICAMERA_OBJS) \
                $(OEM_IMAGEPRO_OBJS) \
                $(OEM_IBITMAPFX_OBJS) \
                $(OEM_AUDIO_NONPK_OBJS)\
                $(OEM_IMEDIASVG_NONPK_OBJS)\
                $(OEM_USBDRIVER_LIB_OBJS)\
                $(EXT_ADDRBOOKEXT_OBJS) \
                $(EXT_IALERT_OBJS) \
                $(EXT_ICM_OBJS) \
                $(EXT_IPDP_OBJS) \
                $(EXT_OEMCFGI_OBJS) \
                $(EXT_SYSMODELBASE_OBJS) \
                $(EXT_ISUPPSVC_OBJS) \
                $(EXT_IRATS_OBJS) \
                $(EXT_IVECTOR_OBJS) \
                $(EXT_MM_OBJS) \
                $(EXT_OEM_OBJS) \
                $(BTHOSTSTATEXT_OBJS) \
                $(EXT_QTV_OBJS) \
                $(EXT_IJOY_OBJS) \
                $(EXT_OVERLAY_OBJS) \
                $(EXT_I3D_OBJS) \
                $(EXT_IDIAG_OBJS) \
                $(EXT_IXTRA_OBJS) \
                $(EXT_IQOSSESSIONEX_OBJS) \
                $(EXT_QVP_OBJS) \
                $(EXT_IMS_VIDEOPHONE_OBJS) \
                $(VIDEOPHONE_LOGGING_OBJS) \
                $(EXT_UIM_OBJS) \
                $(EXT_WMS_LIB_OBJS) \
                $(AUDFMT_AACREC_OBJS) \
                $(EXT_GIFVIEWER_OBJS) \
                $(EXT_IHDR_OBJS) \
                $(EXT_IIPL_OBJS) \
                $(EXT_IYCBCR_OBJS) \
                $(Q3D_LIB_OBJS) \
                $(EXT_SENSORS_OBJS)

#                $(ACP_OBJS) \        deleted for 6500

ifneq ($(USES_UIONE),yes)
OBJECTS2 += \
                $(CONTACT_OBJS) \
                $(DIALERAPP_OBJS) \
                $(RECENTCALLS_OBJS) \
                $(EXT_IANNUNCIATOR_OBJS) \
                $(EXT_IALARM_OBJS) \
                $(EXT_IBATT_OBJS)
endif

# 0605 added for camera driver   
ifeq ($(USE_CAMERA_OV2630),yes)
OBJECTS2 += \
                $(CAMSENSOR_OV2630_OV2M0_OBJS) 
endif

ifeq ($(USE_CAMERA_OV3640),yes)
OBJECTS2 += \
                $(CAMSENSOR_OV3640_OV3M0_OBJS) 
endif

ifeq ($(USE_CAMERA_SIV120A),yes)
OBJECTS2 += \
                $(CAMSENSOR_SIV120A_SETI_OBJS) 
endif

ifeq ($(USE_CAMERA_SIV120B),yes)
OBJECTS2 += \
                $(CAMSENSOR_SIV120B_SETI_OBJS) 
endif

ifeq ($(USE_CAMERA_OV2655),yes)
OBJECTS2 += \
                $(CAMSENSOR_OV2655_OV2M0_OBJS) 
endif 
                
ifeq ($(USE_CAMERA_TSB9001),yes)
OBJECTS2 += \
                $(CAMSENSOR_TMC9001MD_TOSHIBA_OBJS)
endif

ifeq ($(USE_CAMERA_OV9660),yes)
OBJECTS2 += \
                $(CAMSENSOR_OV9660_OV1M3_OBJS)
endif
# 0605 added for camera driver end  
               
#-------------------------------------------------------------------------------
# Object List Modifiers
#    Alter the object list based on the requested features
#-------------------------------------------------------------------------------

ifeq ($(USES_UIONE),yes)
        OBJECTS += $(TESTAPPS_OBJS)
endif


ifneq ($(USES_THINUI),yes)
        OBJECTS += $(OBJECTS2)
endif

ifeq ($(USES_L4),yes)
        OBJECTS := $(filter-out $(DLOAD_OBJS), $(OBJECTS))
        OBJECTS := $(filter-out $(REX_OBJS), $(OBJECTS))
        OBJECTS += $(QDIAG_OBJS) $(REXL4_OBJS)
endif

ifeq ($(USES_HWTC),yes)
    # *** Need to be first to be able to change default DMSS settings to default HWTC settings
    include $(HWTC)/hwtc_flags.min
endif

ifeq ($(USES_HDR),yes)
        OBJECTS += $(HDRBC_OBJS) $(HDRCOMMON_OBJS) $(HDRCP_OBJS) $(HDRDRIVERS_OBJS) $(HDRMDSP_OBJS) $(DATA_HDR_OBJS) $(DATA_HDR_MDM_OBJS)
        OBJECTS += $(HDRHIT_OBJS) $(HDRMAC_OBJS) $(HDRSRCH_OBJS) $(HDRTAP_OBJS)
endif

ifeq ($(USES_HFAT),yes)
        OBJECTS += $(HFAT_OBJS)
endif


ifeq ($(USES_RUIM),yes)
        OBJECTS += $(RUIM_OBJS) $(NVIM_RUIM_OBJS) $(MMGSDI_OBJS)
endif

ifeq ($(USES_AUTH),yes)
        OBJECTS += $(AUTH_OBJS)
endif

ifeq ($(USES_MMC),yes)
        OBJECTS += $(MMC_OBJS)
endif

ifeq ($(USES_SDCC),yes)
        OBJECTS += $(SDCC_OBJS)
endif

ifeq ($(USE_MA60X_SDCC),yes)
        OBJECTS += $(MA60X_SDCC_OBJS)
endif

ifeq ($(USES_PLT),yes)
        OBJECTS += $(PLT_OBJS) $(RPC_OBJS)
endif

ifeq ($(USES_SVGDOM), yes)
        OBJECTS += $(EXT_SVGDOM_OBJS)
endif

ifeq ($(USES_FTM),yes)
        OBJECTS += $(FTM_OBJS)
  ifeq ($(USES_FTM_HWTC),yes)
          OBJECTS += $(FTM_HWTC_OBJS)
  endif
endif

OBJECTS += $(AUDFMT_MPEG_OBJS)  # sbin's fix for FEATURE_AAC inclusion.

ifeq ($(USES_CAMCORDER),yes)
        OBJECTS += $(CAMCORDER_OBJS)
        OBJECTS += $(CAMCORDER_LTIER_OBJS)
        OBJECTS += $(MOVIEEDIT_OBJS)
        OBJECTS += $(QCAMCORDER_OBJS)
        OBJECTS += $(TRANSCODER_OBJS)
        OBJECTS += $(EXT_MOVIEEDIT_LIB_OBJS)
        OBJECTS += $(EXT_MOVIEFILE_LIB_OBJS)
        OBJECTS += $(VIDEOFMT_OBJS)
endif

ifeq ($(USES_MP4),yes)
        OBJECTS += $(QTV_AUDIOPLAYER_OBJS)
        OBJECTS += $(QTV_PLAYERTASK_OBJS)
        OBJECTS += $(QTV_AVSYNC_OBJS)
        OBJECTS += $(QTV_PLAYERAPI_OBJS)
        OBJECTS += $(QTV_VIDEOPLAYER_OBJS)
        OBJECTS += $(QTV_RENDERER_OBJS)
        OBJECTS += $(QTV_BASE_LEGACY_OBJS)
        OBJECTS += $(QTV_AUDIOFILEPARSER_OBJS)
        OBJECTS += $(QTV_ASFPARSER_OBJS)
        OBJECTS += $(QTV_AVIPARSER_OBJS)
        OBJECTS += $(QTV_FILEMEDIABASE_OBJS)
        OBJECTS += $(QTV_MP4PARSER_OBJS)
        OBJECTS += $(QTV_TIMETEXT_OBJS)
        OBJECTS += $(QTV_TRACKSELECTION_OBJS)
        OBJECTS += $(QTV_DEC_CORE_OBJS)
        OBJECTS += $(QTV_DEC_COMMON_OBJS)
        OBJECTS += $(QTV_BASE_OBJS)
        OBJECTS += $(QTV_DESCRAMBLERPROXY_OBJS)
        OBJECTS += $(QTV_FASTTRACK_OBJS)
        OBJECTS += $(QTV_PROGRESSIVEDOWNLOAD_OBJS)
        OBJECTS += $(QTV_NETIO_OBJS)
        OBJECTS += $(QTV_PVPLAYLISTINFO_OBJS)
        OBJECTS += $(QTV_RTP_OBJS)
        OBJECTS += $(QTV_RTSP_OBJS)
        OBJECTS += $(QTV_SDP_BASE_OBJS)
        OBJECTS += $(QTV_MEDIAINFO_OBJS)
        OBJECTS += $(QTV_MEDIAINFOPARSER_OBJS)
        OBJECTS += $(QTV_DOWNLOAD_MEDIA_BASE_OBJS)
        OBJECTS += $(QTV_SESSIONINFO_OBJS)
        OBJECTS += $(QTV_SESSIONINFOPARSER_OBJS)
        OBJECTS += $(QTV_STREAMCONTROL_OBJS)
        OBJECTS += $(QTV_STREAMMAPI_OBJS)
        OBJECTS += $(QTV_STREAMPOLICY_OBJS)
        OBJECTS += $(QTV_STREAMSESSIONDB_OBJS)
        OBJECTS += $(QTV_STREAMUTILS_OBJS)
        OBJECTS += $(QTV_GENERIC_OBJS)
        OBJECTS += $(QTV_CONCURRENCYMGR_OBJS)
        OBJECTS += $(QTV_CONFIG_OBJS)
        OBJECTS += $(QTV_DIAG_OBJS)
        OBJECTS += $(QTV_MAPICORE_OBJS)
        OBJECTS += $(QTV_ADTS_OBJS)
        OBJECTS += $(QTV_FILTER_COMMON_OBJS)
        OBJECTS += $(QTV_FADER_OBJS)
        OBJECTS += $(QTV_LOGGER_OBJS)
        OBJECTS += $(QTV_REALTIME_OBJS)
        OBJECTS += $(QTV_TAM_OBJS)
        OBJECTS += $(QTV_TSB_OBJS)
        OBJECTS += $(QTV_VIDEOTS_OBJS)
        OBJECTS += $(QTV_FLO_OBJS)
        OBJECTS += $(QTV_MEDIAMASK_OBJS)
        OBJECTS += $(QTV_MAPIUTILS_OBJS)
        OBJECTS += $(QTV_BCAST_GENERIC_OBJS)
        OBJECTS += $(QTV_BSD_OBJS)
        OBJECTS += $(QTV_IPL_OBJS)
        OBJECTS += $(QTV_OSCL_OBJS)
        OBJECTS += $(QTV_QCPLAYER_OBJS)
        OBJECTS += $(QTV_TASK_OBJS)
        OBJECTS += $(QTV_VIDEODELAYANALYZER_OBJS)
        OBJECTS += $(QTV_ZREX_OBJS)
        OBJECTS += $(QTV_UTILS_ALLOCATOR_OBJS)
        OBJECTS += $(QTV_STREAMRECORDER_OBJS)
        OBJECTS += $(QTV_UTILS_URL_OBJS)
        OBJECTS += $(QTV_UTILS_SYSTEM_OBJS)
        OBJECTS += $(QTV_UTILS_BLOB_OBJS)
        OBJECTS += $(QTV_UTILS_HSM_OBJS)
        OBJECTS += $(QTV_UTILS_UNICODE_OBJS)
        OBJECTS += $(QTV_UTILS_F3_OBJS)
        OBJECTS += $(QTV_UTILS_COMMON_OBJS)
        OBJECTS += $(QTV_UTILS_DISPATCH_OBJS)
        OBJECTS += $(QTV_OEM_OBJS)
endif

ifeq ($(USES_BT),yes)
        OBJECTS += $(BTHOSTCORE_OBJS)
  ifeq ($(USES_IBT),yes)
          OBJECTS += $(BTHOSTSTATAPP_OBJS)
          OBJECTS += $(BTHOSTIBT_OBJS)
  endif
  ifeq ($(USES_QBT),yes)
          OBJECTS += $(BTHOSTPF_OBJS)
  endif
endif

ifeq ($(USES_STA),yes)
        OBJECTS += $(STA_OBJS)
endif

ifeq ($(USES_ONCRPC),yes)
        OBJECTS += $(ONCRPC_OBJS)
endif


ifeq ($(USES_VRSD),yes)
        OBJECTS := $(filter-out $(PUREVOICE_OBJS), $(OBJECTS))
endif

ifeq ($(USES_EFS2),yes)
        OBJECTS += $(EFS_OBJS)
        OBJECTS += $(FLASH_OBJS)
endif

ifeq ($(USES_FDI),yes)
        OBJECTS += $(FDI_OBJS)
endif

ifeq ($(USES_AUDFMT_AMR),yes)
        OBJECTS += $(AMRSUP_OBJS)
endif

ifeq ($(USES_WM),yes)
        OBJECTS += $(AUDFMT_WMA_OBJS)
endif

ifeq ($(USES_EGL),yes)
        OBJECTS += $(OGLES_OEM_OBJS)
endif

ifeq ($(USES_GRP),yes)
        OBJECTS += $(GRP_OBJS)
endif

ifeq ($(USES_GSTK),yes)
        OBJECTS += $(GSTK_OBJS)
        OBJECTS += $(CATAPP_OBJS)
endif

ifeq ($(USES_QVP),yes)
        OBJECTS += $(VIDEOPHONE_OBJS)
endif

ifeq ($(USES_PBMTASK),yes)
        OBJECTS += $(PBM_OBJS)
endif

ifeq ($(USES_HWTC), yes)
    # *** HWTC must be last. Need to remove unwanted objects/libraries.

    # HWTC requires the UIM drivers only
    # the hwtc.min will remove unwanted
    # files.
    ifeq ($(USES_RUIM),no)
          OBJECTS += $(RUIM_OBJS)
    endif

    include $(HWTC)/hwtc.min
endif

ifeq ($(USES_MDDI),yes)
     OBJECTS += $(MDDI_OBJS)
endif

ifeq ($(USES_JOYST), yes)
     OBJECTS += $(JOYST_OBJS)
endif

ifeq ($(USES_FOTA), yes)
       OBJECTS += $(DMTASK_OBJS)
       OBJECTS += $(AMSS_FOTA_PRIV_OBJS)
       OBJECTS += $(AMSS_FOTA_OBJS)
endif

ifeq ($(USES_PROGRESSIVE_BOOT), yes)
ifneq ($(USES_L4),yes)
       OBJECTS += $(BOOT_PROGRESSIVE_OBJS)
endif
endif

ifeq ($(USES_PROFDIAG), yes)
       OBJECTS += $(PROFDIAG_OBJS)
endif

ifeq ($(USES_DTV), yes)
       OBJECTS += $(TARGETDIR)/dtv_common.lib
endif

ifeq ($(USES_DTV_ISDB), yes)
       OBJECTS += $(TARGETDIR)/dtv_isdb.lib
endif

ifeq ($(USES_WLAN), yes)
       OBJECTS += $(WLAN_OBJS)
       OBJECTS += $(WLAN_DATA_OBJS)
endif

ifeq ($(USES_QIPCALL), yes)
       OBJECTS += $(QIPCALL_OBJS)
endif

ifeq ($(USES_IMS), yes)
    OBJECTS += $(IMS_SETTINGS_OBJS)
    ifeq ($(USES_IMSTM), yes)	
	OBJECTS += $(TESTMANAGER_OBJS)	
    endif
endif

ifeq ($(USES_SENSORS),yes)
     OBJECTS += $(SENSORS_OBJS)
endif

ifeq ($(USES_VR), yes)
        OBJECTS += $(VDB_OBJS)
        OBJECTS += $(VM_OBJS)
        OBJECTS += $(VR_OBJS)
        OBJECTS += $(VRE_OBJS)
        OBJECTS += $(PUREVOICE_OBJS)
endif

ifeq ($(USES_QDJ), yes)
   OBJECTS += $(QDJ_OBJS)
endif

ifeq ($(USES_REAL),yes)
    OBJECTS += $(AUDFMT_REAL_AUDIO_OBJS)
    OBJECTS += $(QTV_REAL_OBJS)
    ifeq ($(USES_MP4),no)
        OBJECTS += $(QTV_BSD_OBJS)
    endif
endif

ifeq ($(USES_IRDM), yes)
   OBJECTS += $(EXT_IRDM_OBJS)
endif

ifeq ($(USES_SEC_CLNT), yes)
   OBJECTS += $(SEC_OEM_OBJS)
endif

ifeq ($(USES_IRDM), yes)
   include $(BREW_STATIC_EXTENSIONS_OEM_SRC)/ext_rdm.min
endif

ifeq ($(USES_PICT_BRIDGE), yes)
OBJECTS += $(EXT_PICTBRIDGE_OBJS)
endif

ifeq ($(USES_PICT_BRIDGE), yes)
OBJECTS += $(PTB_OBJS)
endif

ifeq ($(USES_PICT_BRIDGE), yes)
OBJECTS += $(PBPRINT_OBJS)
endif


#-------------------------------------------------------------------------------
# Object List Modifiers
#    Alter the object list based on the requested features
#-------------------------------------------------------------------------------


ifeq ($(USES_DBGR),yes)
    OBJECTS += $(DBGR_OBJS)
endif


ifeq ($(USES_DITE_LINK), yes)
     # For L4, Rex and Tramp server libraries are built by the L4 build, which
     # invokes the AMSS/DMSS make file. Don't add to objects since we don't build
     DITE_OBJECTS += $(OBJECTS)\
        $(LIBDIR)/libl4.a $(LIBDIR)/libiguana.a $(LIBDIR)/libhwio.a $(LIBDIR)/libcircular_buffer.a \
        $(LIBDIR)/librex.a $(LIBDIR)/librange_fl.a $(LIBDIR)/libll.a $(LIBDIR)/libnaming.a \
        $(LIBDIR)/libl4e.a $(LIBDIR)/libqdms.a $(LIBDIR)/libqmalloc.a\
        $(LIBDIR)/libefs2.a $(LIBDIR)/libdata_buffer.a \
        $(LIBDIR)/libqids_smms.a \
        $(LIBDIR)/libqids_rpc_infra.a $(LIBDIR)/libqids_rpc_infra_rex.a \
        $(LIBDIR)/libqids_rpc_stubs_server.a $(LIBDIR)/libqids_rpc_stubs_common.a \
        $(LIBDIR)/libmutex.a
endif

ifeq ($(USES_SNDCTL),yes)
     OBJECTS += $(EXT_SNDCTL_OBJS)
endif

ifeq ($(USES_STATIC_MTP), yes)
    #const files for MTP
    include $(SME_DRMMS_MCS)/mcs.min
    include $(SME_DRMMS_MTPH_APP)/mtph.min
endif  


ifeq ($(USES_SECSERVICES_TESTAPP), yes)
       include $(SECSERVICES_TESTAPP)/securityservices.min
       OBJECTS += $(SECSERVICES_TESTAPP_OBJS)
endif


ifeq ($(USES_ICONTENTHANDLERTEST), yes)
	include $(ICONTENTTEST)/icontenthandlertest_drmms.min
	OBJECTS += $(ICONTENTHANDLERTEST_OBJS)
endif

ifeq ($(USES_DUAL_MODULE), yes)
	OBJECTS += $(DMATM_OBJS)
	OBJECTS += $(SLCM_OBJS)
endif

#-------------------------------------------------------------------------------
# Add PBL_OBJS and CFG_DATA_OBJS to the object list if its a NOR boot.
#-------------------------------------------------------------------------------
ifeq ($(FLASH_TYPE), nor)
    OBJECTS += \
        ${PBL_OBJS} \
        $(CFG_DATA_OBJS)
endif

#-------------------------------------------------------------------------------
# Message Levels
#    These operate on object groups - so these instructions must appear after
#    all the object groups are named
#-------------------------------------------------------------------------------
include dmss_msg_config.min

#-------------------------------------------------------------------------------
# Dependency Generation
#    Names the location of the dependency file and options to the dependency
#    generator.
#-------------------------------------------------------------------------------
DEPFILE := $(TARGETDIR)/$(TARGETDIR).dep

ifeq ($(USES_36_DIGIT_DIAL_STRING),yes)
EXCLUDEDIR := -X ../../services/nv $(EXCLUDEDIR)
else
EXCLUDEDIR := -X ../../services/nv/jcdma_nv $(EXCLUDEDIR)
endif

DEPOPTS := @dmss_$(ASIC)_depopts.min $(EXCLUDEDIR) -d ../.. -bid $(BUILD) -f $(DEPFILE)

ifneq ($(MEM_USAGE),yes)
-include $(DEPFILE)
-include dmss_$(ASIC)_dep.min
endif

#-------------------------------------------------------------------------------
# Memory Usage Generation
#    Generate memory usage for this target
#-------------------------------------------------------------------------------
MEMOPTS := -b $(ASIC)$(BUILD)$(VERSION) -mf $(BUILD).map -lf $(MEMLIST) -sf memsort.lf > $(ASIC)$(BUILD)$(VERSION).mem.html

#-------------------------------------------------------------------------------
# Media File Copy Script
#   Script to copy various media, bar files, mif files, mod files, etc. to the
#   loadefs directory for packaging into HXB files
#-------------------------------------------------------------------------------
MEDIACOPY = dmss6550_mediacopy.cmd

OBJDIR = $(TARGETDIR)

#-------------------------------------------------------------------------------
# Build Rules
#-------------------------------------------------------------------------------
include dmss_rules.min
-include amss_lint_rules.min
-include amss_rvct_rules.min

